<?php
/**
 * Fang_Controller_Contact
 * 联系我们页面，使用intro的i_contact_id展示文章
 * 
 * 作者:  姚刚 (yaogang@the9sense.com)
 * 创建时间: 2011-03-22 06:14:17
 * 修改记录: 
 * 
 * $Id: Contact.php 18 2011-04-17 12:50:07Z coosuu $
 */

class Fang_Controller_Contact extends Fang_Controller_Base {

    /**
     * indexAction 
     * 
     * @return void
     */
    public function indexAction() {

        $intro = $this->intro;
        if (!$intro['i_contact_id']) {
            return $this->errorMessage('暂时没有相关内容');
        }

        try {
            $articleService =& Service::factory('Article');
            $article = $articleService->getInfo($intro['i_contact_id']);
        } catch (Exception $e) {
            return $this->errorMessage($e->getMessage());
        }

        $this->view->set('article', $article);
        return $this->view->render('contact');
    }
}
